<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
response.setCharacterEncoding("utf-8");
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
String htmlData = request.getParameter("content1") != null ? request.getParameter("content1") : "";
String item_id=request.getParameter("item_id");;
String rootPath=request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort();


%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'tjshop_dispaly.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<script type="text/javascript">
	
	function close_me()
	{
		window.close();
	}
	</script>

  </head>
  
  <body>
    <%=htmlData%>
    <br/>
    
  <form name="form1" method="post" action="<%=rootPath+"/Back_TJshop/insert_shopping_item_info_html.do?method=insert_shopping_item_info_html"%>">
    <input type="hidden" name="item_id" id="item_id" value="<%=item_id%>">
    <input type="hidden" name="content1" id="content1" value="<%=htmlspecialchars(htmlData)%>">
    <input type="button" name="button" id="button" value="提交数据" onclick="close_me()">
  </form>
  </body>
</html>
<%!
private String htmlspecialchars(String str) {
	str = str.replaceAll("&", "&amp;");
	str = str.replaceAll("<", "&lt;");
	str = str.replaceAll(">", "&gt;");
	str = str.replaceAll("\"", "&quot;");
	return str;
}
%>